package com.powergisol.gis.dao;

import com.powergisol.gis.entity.*;
import com.powergisol.gis.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface TabDataSettingMapper {

    int saveDataSetting(TabDataSetting tabDataSetting);

    int saveService(TabServiceVo vo);

    void updateService(TabServiceVo tabServiceVo);

    void saveUserService(@Param("userId") Integer userId, @Param("serviceId") Integer serviceId);

    List<Object> listByServiceName(@Param("serviceName") String serviceName, @Param("userId") Integer userId, @Param("serviceType") Integer serviceType);

    List<Object> listYcByServiceName(@Param("serviceName") String serviceName, @Param("userId") Integer userId, @Param("serviceType") Integer serviceType);

    String getSettingIdByService(@Param("serviceName") String serviceName, @Param("userId") Integer userId, @Param("serviceType") Integer serviceType);

    List<Object> listPipe(@Param("settingId") String settingId,@Param("pipeLx")String pipeLx);

    List<Object> listExcelBase(@Param("uuid") String uuid,@Param("userId") Integer userId);

    List<Object> listService(SearchConditionVo vo);

    List<TabMarkerColor> listByMarkers(@Param("uuid") String uuid);

    TabMarkerColor getMarkersByCondition(@Param("uuid") String uuid,@Param("tcmc") String tcmc);

    List<TabMarkerColor>  listByMarkerUndup(@Param("uuid") String uuid);

    List<TcmcDetailVo> listTcmc(@Param("settingId")String settingId);

    void saveMarkerColor(TabMarkerColor color);

    void upMarkerColor(TabMarkerColor color);

    List<TabDataDetail> listBySettingId(@Param("settingId") Integer settingId, @Param("dataIndex") Integer dataIndex);

    TabServiceVo getByServiceName(@Param("serviceName") String serviceName);

    List<TabServiceVo> getByServiceUuid(List<Integer> ServiceIds);
    void saveMarkerStaticColor(TabMarkerStaticColor color);

    List<TabMarkerStaticColor> listStaticMarker();

    Map<String,Object> getByUserName(String userName);

    TabDataSetting getByServiceId(@Param("serviceId") Integer serviceId);

    void delTabDataSetting(@Param("serviceId") Integer serviceId);
    void delTabService(@Param("serviceId") Integer serviceId);
    void delUserService(@Param("serviceId") Integer serviceId);
    void delTabZk(@Param("settingId") Integer settingId);
    void delTabTc(@Param("settingId") Integer settingId);
    void delTabSw(@Param("settingId") Integer settingId);
    void delTabProject(@Param("settingId") Integer settingId);

    String getSettingIdByServiceIds(@Param("serviceIds") String serviceIds);

    List<CreateYcBaseVo> getZkByServiceIds(@Param("zkbh") String zkbh, @Param("tcmc") String tcmc, @Param("settingId") String settingId);

    CreateYcBaseVo getAltitude(@Param("zkbh") String zkbh,@Param("settingId") String settingId);

    CreateYcBaseVo getAltitudeByCondition(@Param("zkbh") String zkbh,@Param("tcmc") String tcmc,@Param("settingId") String settingId);

    List<Map<String,Object>> getZkBh(@Param("settingIds") String settingIds, @Param("lonMin") String lonMin, @Param("lonMax") String lonMax,
                                     @Param("latMin") String latMin, @Param("latMax") String latMax);

    List<TabMarkerColor> listMarkers(@Param("uuid") String uuid);

    List<TabMarkerColor> getMarkerDetail(@Param("uuid") String uuid,@Param("zkfc") String zkfc);


    List<TabDataSetting> getSetIdBySerID(@Param("serviceID") List<Integer> serviceID);

    TabDataSetting getOne(@Param("settingId") Integer settingId);


    List<CreateYcDataVo> getYcData(@Param("zkbh") String zkbh,@Param("settingId") String settingId,@Param("x") double x,@Param("y") double y);

    List<TabMarkerColor> setYcMarker(@Param("zkbh") String zkbh,@Param("settingId") String settingId);

    List<CreateYcDataVo> getYcFwMarker(@Param("zkbh") String zkbh,@Param("settingId") String settingId);

    Integer getZkfc(@Param("tcmc") String tcmc,@Param("settingId") Integer settingId);

    TabDataSetting getOneByUuid(@Param("uuid") String uuid);

    List<TabDataSetting> selectAll();

    TabServiceVo getUrlByServiceId(@Param("serviceId") Integer serviceId);

    TabSceneDrawVo getSceneDrawByServiceName(String serviceName);

    List<TabPipeStaticColor> selectBySettingId(@Param("id") int id);

    TabServiceVo getBySerId(@Param("id") Integer serviceId);
}
